﻿#pragma once

//----------------------------------------------------------//
#define DELETE_NULL(x) delete x; x=NULL;

//----------------------------------------------------------//
// mouse
enum MouseButton
{
	BTN_L_DOWN = 0,
	BTN_L_UP,
	BTN_R_DOWN,
	BTN_R_UP,
	BTN_M_DOWN,
	BTN_M_UP,
	BTN_MAX,
};

struct MouseEvent
{
	MouseEvent(int x=0, int y=0, MouseButton button=BTN_MAX)
		:_x(x)
		,_y(y)
		,_button(button)
		,_wheel(0)
	{
	}

	int _x, _y;
	MouseButton _button;
	int _wheel;
};

class MouseEventListener
{
public:
	virtual void MouseEventMove(MouseEvent& evt) = 0;
	virtual void MouseEventClick(MouseEvent& evt) = 0;
	virtual void MouseEventWheel(MouseEvent& evt) = 0;
};


//--------------------------------------------------------//
//key
enum KeyButton
{
	KEY_DOWN = 0,
	KEY_UP,
	KEY_MAX,
};

struct KeyEvent
{
	KeyEvent(int key=0, KeyButton button=KEY_MAX)
		:_key(key)
		,_button(button)
	{
	}

	int _key;
	KeyButton _button;
};

//고갱님의 주소를 적어내는 신청서
class KeyEventListener
{
public:
	/*virtual void KeyEventDown(KeyEvent& evt) = 0;
	virtual void KeyEventUp(KeyEvent& evt) = 0;*/
	//내 주소는 이거임(고갱님의 집주소)
	//신문을 구독하고 싶으신 분은 아래의 함수형태와 같은 함수를 새로 구현해 주셔야 합니다
	virtual void KeyEventMsg(KeyEvent& evt) = 0;
};
//--------------------------------------------------------//
